using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;


/// <summary>
/// MonoBehaviour生命周期事件
/// </summary>
public class MonoEventListener : MonoBehaviour
{ 
    public UnityEvent onAwake = new UnityEvent();

    public UnityEvent onStart = new UnityEvent();

    public UnityEvent onEnable = new UnityEvent();
     
    public UnityEvent onDisable = new UnityEvent();

    public UnityEvent onDestroy = new UnityEvent();

    private void Awake()
    {  
        onAwake?.Invoke();
    }

    private void Start()
    {
        onStart?.Invoke();
    }

    private void OnEnable()
    {
        onEnable?.Invoke();
    }

    private void OnDisable()
    {
        onDisable?.Invoke();
    }

    private void OnDestroy()
    {
        onDestroy?.Invoke();
    }

}
